//
//  HMHomeMaxCell.m
//  LoveFreshBeen
//
//  Created by huodian on 16/10/15.
//  Copyright © 2016年 魏根. All rights reserved.
//

#import "HMHomeMaxCell.h"

#import <Masonry.h>

#import "HomeFocusModel.h"

#import <UIImageView+WebCache.h>

@interface HMHomeMaxCell()


@property(nonatomic,strong)UIImageView* imageView1;

@end

@implementation HMHomeMaxCell


-(void)setModel:(HomeFocusModel *)model
{
    _model = model;
    

    NSURL* url = [NSURL URLWithString:model.img];
    
    [self.imageView1 sd_setImageWithURL:url placeholderImage:[UIImage imageNamed:@"v2_placeholder_full_size"]];
    
    
    
    [self layoutIfNeeded];
    
    
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self == [super initWithStyle:style reuseIdentifier:reuseIdentifier])
    {
        
        
        [self setMyUI];
        
    }
    return self;
    
    
}

-(void)setMyUI
{
    
    self.contentView.backgroundColor = [UIColor colorWithRed:239/255.0 green:239/255.0 blue:239/255.0 alpha:1];
    
    UIImageView* imageView = [[UIImageView alloc]init];
    
    self.imageView1 = imageView;
    
    [self.contentView addSubview:imageView];
    
    [imageView mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.top.leading.equalTo(self.contentView).offset(5);
        make.bottom.trailing.equalTo(self.contentView).offset(-5);
        
        
    }];
    
    
    
    
}

- (void)awakeFromNib {
    [super awakeFromNib];
   

    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
